feat: improve accessibility of library controls and book viewer (#31) #43
+153
−27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Accessibility pass for the library controls and book viewer before delivery.
Loading, empty-result and changed-book feedback is now announced through a single status region that is always present, so screen readers pick up each change reliably. Errors are still announced through an alert.
Keyboard focus is no longer lost at the first/last book or when removing a favorite, and the no-cover fallback now names the book, matching the cover's alt text.
Changes
role="status"region inApparia-livefrom the2 / 3counter so the change is not announced twicedisabledwitharia-disabledon Previous/Next so the buttons keep focus at the first/last bookNo cover available for <title>)SubjectFilter,SortSelect,BookJumpListandFavoriteButton; no changes neededaria-disabledfocus behaviour, keyboard activation, focus after removal, the no-cover fallback, and keyboard-only use of the libraryApp,BookCard,NavigationControlsandFavoritesViewsnapshots deliberately to reflect the markup changes aboveTesting
npm run format:checknpm run lintnpm testnpm run buildAI assistance
AI was used to assist with implementation and test development. The changes were reviewed before submission.
Closes #31